<extend name="Base/common"/>

<block name="style">
<link href="__CSS__/stylesheet.css" rel="stylesheet">
<link href="__CSS__/business.css" rel="stylesheet">
</block>

<block name="header">
<header>
	<include file="User/header" />
</header>
</block>

<block name="body">
<div class="container main">
	<div class="user-main">
		<div class="col-xs-3">
			<include file="Business/left_menu" />
		</div>
		<div class="col-xs-9">
			<h5>商品管理</h5>
			<div class="content">
				<ul class="right-head-nav">
					<li <eq name="type" value="sale">class="selected"</eq>><a href="{:U('Business/putong', array('type'=>'sale'))}">出售中（{$salecount}）</a></li>
					<li <eq name="type" value="store">class="selected"</eq>><a href="{:U('Business/putong', array('type'=>'store'))}">仓库中（{$storecount}）</a></li>
				</ul>
				<div class="table-list products">
					<div class="hd">
						<ul class="table">
							<li>商品标题</li>
							<li>价格</li>
							<li>库存</li>
							<li>已售</li>
							<li>加入专题</li>
							<li>操作</li>
						</ul>
					</div>
					<div class="bd">
						<ul class="products-list">							
							<volist name="_list" id="vo">
							<li>
								<ul class="table">
									<li>
										<a href="{:U('EditPutong',array('id'=>$vo['id']))}" class="thumb">
										<img src="__ROOT__{$vo.image_path}"></a>
										<a href="{:U('EditPutong',array('id'=>$vo['id']))}">{$vo.title}</a>
									</li>
									<li>￥{$vo.price}</li>
									<li>{$vo.sales}</li>
									<li>{$vo.quantity}</li>
									<li>
									<eq name="info['in_special_panic']" value="1">
									<p>已加入抢购会</p>
									<else />
									<p>未加入抢购会</p>
									</eq>
									<eq name="info['in_special_gift']" value="1">
									<p>已加入选礼物</p>
									<else />
									<p>未加入选礼物</p>
									</eq>
									</li>
									<li class="action">
										<a href="{:U('EditPutong',array('id'=>$vo['id']))}">编辑宝贝</a>
										<eq value="1" name="vo['status']">
											<a href="{:U('AjaxAction/putway',array('id'=>$vo['id'],'status'=>0))}" class="ajax-get">下架</a>
											<else />
											<a href="{:U('AjaxAction/putway',array('id'=>$vo['id'],'status'=>1))}" class=" ajax-get">上架</a>
										</eq>
										<a href="{:U('AjaxAction/myproductdel',array('id'=>$vo['id']))}" class="ajax-get">删除</a>
										<a href="#" class="ajax-get">分享</a>
									</li>
								</ul>
							</li>
							</volist>
							
						</ul>
						<div class="page center">{$_page}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>

<block name="script">
<script type="text/javascript">	
highlight_leftnav("{:U('Business/putong')}");
highlight_subnav("{:U('Business/index')}");
</script>
</block>